package org.compression.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Select;
import org.model.business.AduioAttr;
import org.model.business.BookMagament;
import org.model.comm.Page;

@Mapper
public interface AduioAttrMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(AduioAttr record);

    int insertSelective(AduioAttr record);

    AduioAttr selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(AduioAttr record);

    int updateByPrimaryKey(AduioAttr record);
    
    
    

    @Select("select * from aduio_attr limit #{currentPageNum},#{pageSize}")
 	public List<AduioAttr> getPageBookMagament(Page mPage);
    
    
    @Select("select count(*) from aduio_attr")
 	public long getTotal();

    @Select("select * from aduio_attr where name like CONCAT('%',#{name},'%') ")
	public List<AduioAttr> selectName(AduioAttr mBookMagaments);
    
    @Insert("insert into aduio_attr (name) values (#{name})")
    @Options(useGeneratedKeys=true, keyProperty="id", keyColumn="id")
    public int insertBookMagament(AduioAttr mBookMagament); 
  
    @Insert("insert into aduio_attr (name,createdate,attr) values (#{name},#{createdate},#{attr})")
    @Options(useGeneratedKeys=true, keyProperty="id", keyColumn="id")
    public int insertBookMagamentDate(AduioAttr mBookMagament); 
    
    
    @Select("select * from  aduio_attr  where uuid=#{uuid}")
    public AduioAttr selectCreateTime(String uuid); 
    
    
  
    
    @Select("select id from  aduio_attr  where attr=#{attr}")
    public List<Integer> selectUUID(String attr);

    @Select("select path from  aduio_attr  where id=#{periodId}")
	public List<String> selectPath(String periodId); 
    
    
    
    
    
    
    
    
    
}